Passed
Push — master ( e04bae...01c4b6 )
by Konrad
02:33
created

highlight.js ➔ highlightRow   A

Complexity

Conditions 5

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
rs 9.3333
c 0
b 0
f 0
cc 5
1
$(function () {
2
    highlightRow();
3
    $('.share-link').click(function() {
4
        setTimeout(function(){ highlightRow(); }, 200);
5
6
    });
7
8
    function highlightRow() {
9
        const anchor = window.location.hash.substr(1);
10
            $('tr').removeClass('highlight');
11
        if (anchor !== '') {
12
            $('#' + anchor).addClass('highlight');
13
        }
14
    }
15
})